cmake_minimum_required(VERSION 3.8)
project(sqchache)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()
include_directories(
  include
  ${Boost_INCLUDE_DIRS}
)
aux_source_directory(src SRC_LISTS)
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)
#add_executable(chache ${SRC_LISTS})
add_executable(chache src/chache_node.cpp src/Serial.cpp src/yaogan.cpp src/motor_drv.cpp)
ament_target_dependencies(chache rclcpp std_msgs nav_msgs geometry_msgs tf2 tf2_ros  tf2_geometry_msgs)
install(TARGETS chache
  chache
  DESTINATION lib/${PROJECT_NAME})

 install(DIRECTORY launch 
  DESTINATION share/${PROJECT_NAME}
)
ament_package()
